<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>存定期</title>
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/jiazai.css">
    <style>
        .hea-con {
            position: fixed;
            top: 10px;
            right: 0;
            left: 0;
            box-sizing: border-box;
            padding: 0 20px;
            font-size: 16px;
            color: white;
            opacity: .7;
        }
        
        .content {
            position: fixed;
            top: 70px;
            right: 0;
            left: 0;
            bottom: 60px;
            overflow: auto;
        }
        
        .bill-mon>h2 {
            text-align: center;
            font-size: 14px;
            color: white;
        }
        
        .bill-mon>p {
            padding-top: 8px;
            text-align: center;
            color: #9197ae;
        }
        
        .bill-mon>h1 {
            padding-top: 20px;
            text-align: center;
            font-size: 22px;
            color: #1AD386;
        }
        
        .bill-list {
            padding: 0 20px;
            margin-top: 60px;
        }
        
        .bill-list>div {
            padding-bottom: 20px;
            padding-top: 20px;
            border-bottom: 1px solid #272525;
            opacity: .8;
        }
        
        .bill-list>div>span:first-of-type {
            font-size: 13px;
            color: #9197ae;
        }
        
        .bill-list>div>span:last-of-type {
            font-size: 14px;
            color: white;
        }
        
        .ov-auto>span {
            flex: 0 0 100px;
        }
        
        .ov-auto>div {
            flex: 1 1 0;
            width: 100%;
            overflow: auto;
            font-size: 14px;
            text-align: right;
            color: white;
        }
        
        .fixed-bottom {
            position: fixed;
            right: 0;
            left: 0;
            bottom: 0;
            padding: 30px 0;
            font-size: 14px;
            color: #9197ae;
            text-align: center;
        }
    </style>
</head>

<body style="background:#2a2c35;">
    <div id='app'>

        <!-- 加载中动画 -->
        <div id='jiazai-ani' v-if='jiazai'>
            <div class="arc"></div>
            <h1><span>LOADING</span></h1>
        </div>
        <!-- 加载中动画 -->

        <div class='hea-con dis-spa'>
            <img @click='_close()' src="./img/left.svg" width="22px" height="22px">
            <span>
                账单详情
            </span>
            <span style='opacity: 0;'>1</span>
        </div>

        <div class='content'>
            <div class='bill-mon'>
                <h2>定期</h2>
                <p>加速定期</p>
                <h1 v-text='billData.text1' :style="{'color':billData.text1.slice(0,1)=='-'?'#F25B5B':''}">+15000</h1>
            </div>
            <div class="bill-list">
                <div class='dis-spa'>
                    <span>日期：</span>
                    <span v-text='billData.text2'>2048-12-45</span>
                </div>
                <div class='dis-spa'>
                    <span>当前定期余额结算：</span>
                    <span v-text='billData.text3'>2048-12-45</span>
                </div>
                <div class='dis-spa ov-auto'>
                    <span style="color: #9197ae;">收益百分比：</span>
                    <div>
                        <span v-text='billData.text4'>2048-12-45</span>
                    </div>
                </div>
                <div class='dis-spa'>
                    <span>目标：</span>
                    <span v-text='billData.text5'>定期余额</span>
                </div>
            </div>
        </div>

        <!-- <div class='fixed-bottom' @click="_openHref({url:'shou-jie-info.html',id:'shouJieInfo'})">
            收益/释放说明
        </div> -->

    </div>
    <script src="js/comm.js"></script>
    <script src="js/vue.min.js"></script>
    <script src="js/jquery.min.js"></script>
    <script>
        var send = function(id) {
            app.$data.billid = id;
            app.getData();
        };
        var app = new Vue({
            el: '#app',
            data: {
                jiazai: false,
                //账单id
                billid: '',
                //账单数据
                billData: {
                    "billid": "130",
                    "text1": "最高收益300%",
                    "text2": "2018.12.11 11:41",
                    "text3": "-100.000000",
                    "text4": "+300.000000",
                    "text5": "正在",
                    "text6": "每日6‰"
                }
            },
            methods: {
                getData: function() {
                    var This = this;
                    var user = JSON.parse(localStorage.getItem('cc_user'));
                    this.jiazai = true;
                    _post(BILL_INFO, {
                        userid: user.userid,
                        session: user.session,
                        billid: This.billid
                    }, function(data) {
                        This.jiazai = false;
                        if (data.status == 1) {
                            This.billData = data.back;
                        } else {
                            _toast(data.msg);
                            setTimeout(function() {
                                _close();
                            }, 1500);
                        }
                    });
                }
            }
        });
    </script>
</body>

</html>